Conversation
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.7.4 x -- echo |
17.3 ± 0.5 | 16.7 | 22.1 | 1.00 |
mise x -- echo |
17.5 ± 0.5 | 16.7 | 19.1 | 1.01 ± 0.04 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.7.4 env |
16.5 ± 0.2 | 16.2 | 18.7 | 1.00 |
mise env |
16.9 ± 0.5 | 16.3 | 23.0 | 1.02 ± 0.03 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.7.4 hook-env |
16.7 ± 0.2 | 16.2 | 17.7 | 1.00 |
mise hook-env |
16.7 ± 0.3 | 16.2 | 17.8 | 1.00 ± 0.02 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.7.4 ls |
15.0 ± 0.4 | 14.4 | 18.3 | 1.00 |
mise ls |
15.0 ± 0.2 | 14.5 | 15.9 | 1.00 ± 0.03 |
xtasks/test/perf
| Command | mise-2025.7.4 | mise | Variance |
|---|---|---|---|
| install (uncached) | 757ms | -30% | |
| install (cached) | 121ms | 123ms | -1% |
| ls (uncached) | 690ms | 690ms | +0% |
| ls (cached) | 78ms | 77ms | +1% |
| bin-paths (uncached) | 697ms | -31% | |
| bin-paths (cached) | 63ms | 63ms | +0% |
| task-ls (uncached) | 3283ms | 3514ms | -6% |
| task-ls (cached) | 253ms | 252ms | +0% |
325f000 to
768dd83
Compare
fe73690 to
8330de1
Compare
b811b73 to
8712e32
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for static backends—GitHub, GitLab, and HTTP—along with platform alias resolution and raw file handling in the archive utilities.
- Introduces
HttpBackendandUnifiedGitBackendimplementations with installation, verification, and extraction logic - Extends
TarFormatwith aRawvariant and updates extraction flow - Adds platform alias utilities and registers new backends in
mod.rs - Includes e2e tests and documentation for HTTP, GitHub, and GitLab backends
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/file.rs | Added Raw variant, updated from_ext, and modified open_tar |
| src/backend/ubi.rs | Added clarifying comment for bin_path lookup |
| src/backend/platform.rs | New platform alias and lookup helpers |
| src/backend/mod.rs | Registered GitHub, GitLab, HTTP backends and added env var |
| src/backend/http.rs | Implemented HTTP backend with download, verify, and install |
| src/backend/github.rs | Implemented unified GitHub/GitLab backend logic |
| src/backend/backend_type.rs | Added Github, Gitlab, and Http backend types |
| e2e/backend/test_http | End-to-end tests for HTTP backend |
| e2e/backend/test_gitlab | End-to-end tests for GitLab backend |
| e2e/backend/test_github | End-to-end tests for GitHub backend |
| docs/dev-tools/mise-lock.md | New lockfile documentation |
| docs/dev-tools/backends/ubi.md | Added binary path lookup order |
| docs/dev-tools/backends/index.md | Listed new backends in index |
| docs/dev-tools/backends/http.md | Documentation for HTTP backend |
| docs/dev-tools/backends/gitlab.md | Documentation for GitLab backend |
| docs/dev-tools/backends/github.md | Documentation for GitHub backend |
| docs/.vitepress/config.ts | Updated sidebar to include new docs |
Comments suppressed due to low confidence (3)
docs/dev-tools/backends/http.md:47
- Key names in docs use
platforms_*_urlbut code expectsplatform_{os}_{arch}_url(singularplatform_). Update examples to match implementation.
platforms_macos_x64_url = "https://example.com/releases/my-tool-v1.0.0-macos-x64.tar.gz"
docs/dev-tools/backends/http.md:75
- Checksum examples use
platforms_*_checksumbut code looks forplatform_{os}_{arch}_checksum. Align docs key naming with code.
platforms_macos_x64_checksum = "sha256:a1b2c3d4e5f6789..."
src/file.rs:652
- There are no unit tests covering
TarFormat::from_ext, especially for.tarand unknown extensions. Consider adding tests to verifyRawand other mappings.
pub fn from_ext(ext: &str) -> Self {
| Ok(match format { | ||
| TarFormat::TarGz => Box::new(GzDecoder::new(f)), | ||
| // TODO: we probably shouldn't assume raw is tar.gz, but this was to retain existing behavior | ||
| TarFormat::TarGz | TarFormat::Raw => Box::new(GzDecoder::new(f)), |
There was a problem hiding this comment.
Treating Raw as gzipped tar in open_tar is misleading; for Raw, return the file reader directly (e.g., Box::new(f)) instead of wrapping in GzDecoder.
| TarFormat::TarGz | TarFormat::Raw => Box::new(GzDecoder::new(f)), | |
| TarFormat::TarGz => Box::new(GzDecoder::new(f)), | |
| TarFormat::Raw => Box::new(f), |
| "gz" | "tgz" => TarFormat::TarGz, | ||
| "xz" | "txz" => TarFormat::TarXz, | ||
| "bz2" | "tbz2" => TarFormat::TarBz2, | ||
| "zst" | "tzst" => TarFormat::TarZst, |
There was a problem hiding this comment.
The .tar extension is not explicitly handled and falls back to Raw, causing tar archives not to be extracted. Consider adding a case for "tar" or supporting uncompressed tars.
| "zst" | "tzst" => TarFormat::TarZst, | |
| "zst" | "tzst" => TarFormat::TarZst, | |
| "tar" => TarFormat::Tar, |
There was a problem hiding this comment.
Bug: Tar Format Mismatch Causes Decompression Failures
The from_ext function now defaults to TarFormat::Raw for unknown file extensions. However, open_tar incorrectly treats TarFormat::Raw identically to TarFormat::TarGz, applying gzip decompression. This mismatch causes files with unknown extensions (classified as Raw) to be processed as gzipped tar files, leading to decompression failures for non-compressed or non-gzipped files. This regression affects code paths using TarFormat::Auto on unknown extensions, breaking the previous fallback to tar.gz.
src/file.rs#L653-L662
Lines 653 to 662 in bc805ff
src/file.rs#L745-L747
Lines 745 to 747 in bc805ff
Was this report helpful? Give feedback by reacting with 👍 or 👎
No description provided.